package com.zmj.service;

import com.zmj.annotaion.Component;
import com.zmj.aware.BeanNameAware;
import com.zmj.interfaces.InitializingBean;
import lombok.Data;

@Component
@Data
public class User implements BeanNameAware, InitializingBean {

    private String beanName;

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
        System.out.println("aware beanName set is:" + beanName);
    }


    @Override
    public void afterPropertiesSet() {
        System.out.println(beanName + " 触发 afterPropertiesSet 调用 ");
    }
}
